package co.edu.usbcali.prototipobeta.dataaccess.daoFactory;

import co.edu.usbcali.prototipobeta.dataaccess.dao.*;


/**
 * Factory for Data Access Objects Strategy The DAO pattern can be made highly flexible
 * by adopting the Abstract Factory [GoF] and the Factory Method [GoF] patterns.
 * When the underlying storage is not subject to change from one implementation to another,
 * this strategy can be implemented using the Factory Method pattern to produce a number of DAOs needed by the application.
 * This class is a Factory Method pattern
 *
 * @author Zathura Code Generator http://code.google.com/p/zathura
 */
public class XMLHibernateDaoFactory {
    private static XMLHibernateDaoFactory instance = null;

    private XMLHibernateDaoFactory() {
    }

    /**
    *
    * @return HibernateDaoFactory
    */
    public static XMLHibernateDaoFactory getInstance() {
        if (instance == null) {
            instance = new XMLHibernateDaoFactory();
        }

        return instance;
    }

    /**
    * This method instantiates the IBebeDAO class for HibernateCore
    * that is used in this applications deployment environment to access the data.
    * @return IBebeDAO implementation
    */
    public IBebeDAO getBebeDAO() {
        return new BebeDAO();
    }

    /**
    * This method instantiates the ICarnetVacunasDAO class for HibernateCore
    * that is used in this applications deployment environment to access the data.
    * @return ICarnetVacunasDAO implementation
    */
    public ICarnetVacunasDAO getCarnetVacunasDAO() {
        return new CarnetVacunasDAO();
    }

    /**
    * This method instantiates the IDetalleEventoDAO class for HibernateCore
    * that is used in this applications deployment environment to access the data.
    * @return IDetalleEventoDAO implementation
    */
    public IDetalleEventoDAO getDetalleEventoDAO() {
        return new DetalleEventoDAO();
    }

    /**
    * This method instantiates the IDetalleMedicinaDAO class for HibernateCore
    * that is used in this applications deployment environment to access the data.
    * @return IDetalleMedicinaDAO implementation
    */
    public IDetalleMedicinaDAO getDetalleMedicinaDAO() {
        return new DetalleMedicinaDAO();
    }

    /**
    * This method instantiates the IEventoDAO class for HibernateCore
    * that is used in this applications deployment environment to access the data.
    * @return IEventoDAO implementation
    */
    public IEventoDAO getEventoDAO() {
        return new EventoDAO();
    }

    /**
    * This method instantiates the IMedicinaDAO class for HibernateCore
    * that is used in this applications deployment environment to access the data.
    * @return IMedicinaDAO implementation
    */
    public IMedicinaDAO getMedicinaDAO() {
        return new MedicinaDAO();
    }

    /**
    * This method instantiates the IRolDAO class for HibernateCore
    * that is used in this applications deployment environment to access the data.
    * @return IRolDAO implementation
    */
    public IRolDAO getRolDAO() {
        return new RolDAO();
    }

    /**
    * This method instantiates the IUsuarioDAO class for HibernateCore
    * that is used in this applications deployment environment to access the data.
    * @return IUsuarioDAO implementation
    */
    public IUsuarioDAO getUsuarioDAO() {
        return new UsuarioDAO();
    }

    /**
    * This method instantiates the IVacunaDAO class for HibernateCore
    * that is used in this applications deployment environment to access the data.
    * @return IVacunaDAO implementation
    */
    public IVacunaDAO getVacunaDAO() {
        return new VacunaDAO();
    }
}
